<template>
	<view>
		<view class="top_box">
			<image src="/static/icons/completed.png" mode="widthFix"></image>
			<view>
				<view class="info">
					支付成功
				</view>
				<view class="price">
					已支付￥{{price}}
				</view>
			</view>
			<view class="icon_box">
				<image src="../../static/icons/payicon.png" mode=""></image>
			</view>
		</view>
		<view class="share_box">
			<view class="share_text">
				立即分享 领取豪礼
			</view>
			<view class="btns">
				<view @click="goIndex">立即分享</view>
				<view @click="goIndex">返回首页</view>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				price: 0,
			}
		},
		methods: {
			goIndex() {
				uni.reLaunch({
					url: '/pages/index/index'
				})
			}
		},
		onLoad: function(options) {
			this.price = options.price;
		}
	}
</script>

<style lang="scss">
	.top_box {
		display: flex;
		flex-direction: column;
		align-items: center;
		height: 300rpx;
		background: #FFAE25;
		border-radius: 0 0 50% 50%;

		>view {
			display: flex;
			flex-direction: column;
			align-items: center;

			.info {
				margin: 10rpx 0;
				font-size: 40rpx;
				color: #FFFFFF;
			}

			.price {
				margin: 10rpx 0;
				color: #ccc;
			}
		}

		image {
			width: 100rpx;
		}

		.icon_box {
			border: 10rpx solid #FF921E;
			border-radius: 50%;
			background: #FFA543;
			width: 300rpx;
			height: 300rpx;

			image {
				width: 100%;
				height: 100%;
			}
		}
	}

	.share_box {
		margin-top: 200rpx;

		>view {
			width: 600rpx;
			margin: 0 auto;
		}

		.share_text {
			color: #5F5F5F;
			font-size: 40rpx;
			text-align: center;
		}

		.btns {
			>view {
				text-align: center;
				height: 100rpx;
				line-height: 100rpx;
				border-radius: 50rpx;
				margin: 20rpx 0;

				&:first-child {
					background-color: #FFA824;
					color: #fff;
				}

				&:last-child {
					border: 2rpx solid #FF921E;
				}
			}
		}
	}
</style>
